//
//  HWItemFootView.m
//  HappyWeekend
//
//  Created by lanou on 16/1/13.
//  Copyright © 2016年 com.mjykj.www. All rights reserved.
//

#import "HWItemFootView.h"

@implementation HWItemFootView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor colorWithRed:235.0f / 255.0f green:235.0f / 255.0f blue:241.0f / 255.0f alpha:1];
        UIImageView *imageV = [[UIImageView alloc] initWithFrame:CGRectMake(50, 17, 16, 16)];
        imageV.image = [UIImage imageNamed:@"itemiconfont-xin"];
        [self addSubview:imageV];
        
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(imageV.right + 10, 16, 40, 16)];
        label.text = @"喜欢";
        [self addSubview:label];
        
        _loveButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _loveButton.frame = CGRectMake(20, 10, label.right + 10, 30);
        _loveButton.layer.masksToBounds = YES;
        _loveButton.layer.cornerRadius = 15;
        _loveButton.layer.borderWidth = 1;
        _loveButton.layer.borderColor = [UIColor colorWithRed:58.0f / 255.0f green:201.0f / 255.0f blue:187.0f / 255.0f alpha:1].CGColor;
        [self addSubview:_loveButton];
        
        _buyButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _buyButton.frame = CGRectMake(_loveButton.right + 20, 10, kScreenWidth - 40 -_loveButton.right, 30);
        _buyButton.layer.masksToBounds = YES;
        _buyButton.layer.cornerRadius = 15;
        [_buyButton setTitle:@"立即前往购买" forState:(UIControlStateNormal)];
        [_buyButton setTitleColor:[UIColor blackColor] forState:(UIControlStateNormal)];
        _buyButton.backgroundColor = [UIColor colorWithRed:58.0f / 255.0f green:201.0f / 255.0f blue:187.0f / 255.0f alpha:1];
        [self addSubview:_buyButton];

        
    }
    return self;
}

@end
